From cf6ef1ac5a706101739577a63fea07f9cea33072 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 3 May 2025 18:19:50 -0700 Subject: [PATCH] mariadb: update to 11.4.7 Use upstream solutions to local patches. Remove test.sh as it's broken. Signed-off-by: Rosen Penev --- utils/mariadb/Makefile | 19 ++++-------- utils/mariadb/patches/100-fix_hostname.patch | 11 ------- .../110-remove-uring-libaio-checks.patch | 13 --------- utils/mariadb/patches/160-mips-machine.patch | 21 -------------- .../190-replace-hostname-in-mysqld_safe.patch | 29 ------------------- utils/mariadb/patches/200-no-selinux.patch | 11 ------- utils/mariadb/patches/210-no-altivec.patch | 24 +++++---------- utils/mariadb/test.sh | 26 ----------------- 8 files changed, 13 insertions(+), 141 deletions(-) delete mode 100644 utils/mariadb/patches/100-fix_hostname.patch delete mode 100644 utils/mariadb/patches/110-remove-uring-libaio-checks.patch delete mode 100644 utils/mariadb/patches/160-mips-machine.patch delete mode 100644 utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch delete mode 100644 utils/mariadb/patches/200-no-selinux.patch delete mode 100755 utils/mariadb/test.sh diff --git a/utils/mariadb/Makefile b/utils/mariadb/Makefile index 4714ba7b35..0895c37be6 100644 --- a/utils/mariadb/Makefile +++ b/utils/mariadb/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mariadb -PKG_VERSION:=11.4.4 -PKG_RELEASE:=2 +PKG_VERSION:=11.4.7 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL := https://archive.mariadb.org/$(PKG_NAME)-$(PKG_VERSION)/source -PKG_HASH:=96fbd2e6e93fb7e8b373eea75d85b6fea57c0e111a02090cbbefed52599dc77b +PKG_HASH:=bf20687ca12fa7efda8df89cab1f2a661288cea41acf8f53189b69d5294347d0 PKG_MAINTAINER:=Michal Hrusecky PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING THIRDPARTY @@ -307,15 +307,6 @@ endef # We won't need unit tests CMAKE_OPTIONS += -DWITH_UNIT_TESTS=0 -# This value is determined automatically during straight compile by compiling -# and running a test code. You cannot do that during cross-compile. However the -# stack grows downward in most if not all modern systems. The only exception -# according to buildroot is PA-RISC which is not supported by OpenWrt as far as -# I know. Therefore it makes sense to hardcode the value. If an arch is added -# the stack of which grows up one should expect unpredictable behavior at run -# time. -CMAKE_OPTIONS += -DSTACK_DIRECTION=-1 - # Make it explicit that we are cross-compiling CMAKE_OPTIONS += -DCMAKE_CROSSCOMPILING=1 @@ -337,6 +328,7 @@ CMAKE_OPTIONS += -DWITHOUT_SERVER=OFF -DPLUGIN_AUTH_SOCKET=STATIC endif CMAKE_OPTIONS += \ + -DCMAKE_DISABLE_FIND_PACKAGE_URING=$(if $(CONFIG_KERNEL_IO_URING),OFF,ON) \ -DCONNECT_WITH_JDBC=NO \ -DCONNECT_WITH_LIBXML2=system \ -DCONNECT_WITH_MONGO=NO \ @@ -361,10 +353,11 @@ CMAKE_OPTIONS += \ -DINSTALL_SQLBENCHDIR="" \ -DINSTALL_SUPPORTFILESDIR=share/mariadb \ -DINSTALL_UNIX_ADDRDIR=$(MARIADB_SOCKET) \ + -DHOSTNAME="uci get system.@system[0].hostname" \ -DMYSQL_DATADIR=/srv/mysql \ -DMYSQL_UNIX_ADDR=$(MARIADB_SOCKET) \ + -DSEMODULE_PACKAGE_EXECUTABLE=NOT-FOUND \ -DSKIP_TESTS=ON \ - -DWITH_DEBUG=OFF \ -DWITH_EMBEDDED_SERVER=OFF \ -DWITH_INNODB_BZIP2=OFF \ -DWITH_INNODB_LZ4=OFF \ diff --git a/utils/mariadb/patches/100-fix_hostname.patch b/utils/mariadb/patches/100-fix_hostname.patch deleted file mode 100644 index 98547e51eb..0000000000 --- a/utils/mariadb/patches/100-fix_hostname.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/scripts/mysql_install_db.sh -+++ b/scripts/mysql_install_db.sh -@@ -431,7 +431,7 @@ fi - - - # Try to determine the hostname --hostname=`@HOSTNAME@` -+hostname=`cat /proc/sys/kernel/hostname` - - # Check if hostname is valid - if test "$do_resolve" -eq 1 diff --git a/utils/mariadb/patches/110-remove-uring-libaio-checks.patch b/utils/mariadb/patches/110-remove-uring-libaio-checks.patch deleted file mode 100644 index 214d92ef2c..0000000000 --- a/utils/mariadb/patches/110-remove-uring-libaio-checks.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/tpool/CMakeLists.txt -+++ b/tpool/CMakeLists.txt -@@ -9,7 +9,9 @@ ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux - ELSEIF(WITH_LIBAIO) - SET(LIBAIO_REQUIRED REQUIRED) - ENDIF() -- FIND_PACKAGE(URING QUIET ${URING_REQUIRED}) -+ IF(WITH_URING) -+ FIND_PACKAGE(URING QUIET ${URING_REQUIRED}) -+ ENDIF() - IF(URING_FOUND) - SET(URING_FOUND ${URING_FOUND} PARENT_SCOPE) - SET(TPOOL_DEFINES "-DHAVE_URING" PARENT_SCOPE) diff --git a/utils/mariadb/patches/160-mips-machine.patch b/utils/mariadb/patches/160-mips-machine.patch deleted file mode 100644 index 06d6dd546e..0000000000 --- a/utils/mariadb/patches/160-mips-machine.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Debian MySQL Maintainers -Date: Thu, 10 Aug 2017 20:40:29 +0200 -Subject: mips-machine - ---- - cmake/package_name.cmake | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/cmake/package_name.cmake -+++ b/cmake/package_name.cmake -@@ -34,6 +34,10 @@ IF(NOT VERSION) - SET(DEFAULT_MACHINE "mips") - ENDIF() - -+ IF(NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64") -+ SET(DEFAULT_MACHINE "mips") -+ ENDIF() -+ - IF(CMAKE_SYSTEM_NAME MATCHES "Windows") - SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0) - SET(DEFAULT_PLATFORM "win") diff --git a/utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch b/utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch deleted file mode 100644 index abb5b4662b..0000000000 --- a/utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/scripts/mysqld_safe.sh -+++ b/scripts/mysqld_safe.sh -@@ -253,7 +253,7 @@ wsrep_recover_position() { - return 1 - fi - -- local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid" -+ local wr_pidfile="$DATADIR/"$(uci get 'system.@system[0].hostname')"-recover.pid" - - local wr_options="--disable-log-error --pid-file='$wr_pidfile'" - -@@ -675,7 +675,7 @@ then - * ) err_log="$DATADIR/$err_log" ;; - esac - else -- err_log=$DATADIR/`@HOSTNAME@`.err -+ err_log=$DATADIR/$(uci get 'system.@system[0].hostname').err - fi - fi - -@@ -761,7 +761,7 @@ fi - - if test -z "$pid_file" - then -- pid_file="`@HOSTNAME@`.pid" -+ pid_file="$(uci get 'system.@system[0].hostname').pid" - fi - # MariaDB wants pid file without datadir - append_arg_to_args "--pid-file=$pid_file" diff --git a/utils/mariadb/patches/200-no-selinux.patch b/utils/mariadb/patches/200-no-selinux.patch deleted file mode 100644 index ba5bd42017..0000000000 --- a/utils/mariadb/patches/200-no-selinux.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/support-files/CMakeLists.txt -+++ b/support-files/CMakeLists.txt -@@ -79,7 +79,7 @@ IF(UNIX AND NOT WITHOUT_SERVER) - INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles) - INSTALL(DIRECTORY policy DESTINATION ${inst_location} COMPONENT SupportFiles) - FIND_PROGRAM(CHECKMODULE checkmodule) -- FIND_PROGRAM(SEMODULE_PACKAGE semodule_package) -+# FIND_PROGRAM(SEMODULE_PACKAGE semodule_package) - MARK_AS_ADVANCED(CHECKMODULE SEMODULE_PACKAGE) - - # Build pp files in policy/selinux diff --git a/utils/mariadb/patches/210-no-altivec.patch b/utils/mariadb/patches/210-no-altivec.patch index a7aab8b3c1..3fdc8bd5fe 100644 --- a/utils/mariadb/patches/210-no-altivec.patch +++ b/utils/mariadb/patches/210-no-altivec.patch @@ -1,21 +1,11 @@ --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt -@@ -138,7 +138,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "a - ENDIF() - ENDIF() - --IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64" OR CMAKE_SYSTEM_NAME MATCHES AIX) -+IF(FALSE) +@@ -142,7 +142,7 @@ ENDIF() + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64" OR CMAKE_SYSTEM_NAME MATCHES AIX) SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_ppc64.c crc32/crc32c_ppc.c) SET_SOURCE_FILES_PROPERTIES(crc32/crc32_ppc64.c crc32/crc32c_ppc.c PROPERTIES - COMPILE_FLAGS "${COMPILE_FLAGS} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector") ---- a/mysys/crc32ieee.cc -+++ b/mysys/crc32ieee.cc -@@ -51,7 +51,6 @@ static my_crc32_t init_crc32() - static const my_crc32_t my_checksum_func= init_crc32(); - - #ifdef __powerpc64__ --# error "my_checksum() is defined in mysys/crc32/crc32_ppc64.c" - #endif - extern "C" - uint32 my_checksum(uint32 crc, const void *data, size_t len) +- COMPILE_FLAGS "${COMPILE_FLAGS} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector") ++ COMPILE_FLAGS "${COMPILE_FLAGS} -mvsx -mcrypto") + ADD_DEFINITIONS(-DHAVE_POWER8 -DHAS_ALTIVEC) + ELSE() + SET (MYSYS_SOURCES ${MYSYS_SOURCES} crc32ieee.cc) diff --git a/utils/mariadb/test.sh b/utils/mariadb/test.sh deleted file mode 100755 index cb33bbae05..0000000000 --- a/utils/mariadb/test.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# shellcheck disable=SC1090 -. "$CI_HELPER" - -check_version() { - bin="$1" - ver="$2" - com="$3" - - if [ -x "$bin" ]; then - if "$bin" --version | grep " $ver-MariaDB"; then - success "MariaDB $com is in version $2" - else - err_die "MariaDB $com seems to be in wrong version" - fi - else - err_die "Can't find $com server binary" - fi -} - -case "$PKG_NAME" in - mariadb-server) check_version /usr/bin/mysqld "$PKG_VERSION" "server" ;; - mariadb-client) check_version /usr/bin/mysql "$PKG_VERSION" "client";; - *) info "Skipping $PKG_NAME" ;; -esac -- 2.30.2